ul {
  width: 500px;
  border: 1px solid;
  padding: 0;
  text-align: center;
  margin: auto;
}
ul li {
  border: 1px solid;
  list-style: none;
  line-height: 30px;
}
ul li:nth-child(2n) {
  background-color: aqua;
}
ul li:nth-child(2n-1) {
  background-color: pink;
}
ul li:hover {
  background-color: green;
  color: white;
}
